package com.bbc.entity.product;


public enum ProductShowTypeEnum {

	SHOW_USER_SHARE(1, "用户分享显示"),
	HIDE_USER_SHARE(2, "用户分享隐藏"),
	SHOW_ADVERTISING(3, "广告显示"),
	HIDE_ADVERTISING(4, "广告隐藏");

	private int key;
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	ProductShowTypeEnum(int key, String name) {
		this.key = key;
		this.name = name;
	}
	
	public static String getProductShowTypeName(int key) {
		for (ProductShowTypeEnum t : ProductShowTypeEnum.values()) {
            if (key == t.getKey()) {
                return t.getName();
            }
        }
        return null;
	}

}
